﻿namespace CKQDJK {
	using System;
	using SuperORM.Attributes;
	using System.ComponentModel;
	
	
	/// <summary>数据库参数</summary>
	[Object("数据库参数", "CKQDJK", "数据库参数")]
	[Browsable(true)]
	[DisplayName("数据库参数")]
	[ReadOnly(false)]
	[Serializable()]
	public class 数据库参数 : SuperORM.BusinessObject {
		
		/// <summary>内部变量：版本号</summary>
		private string m_版本号;
		
		/// <summary>标示属性版本号是否为空的字段。</summary>
		private bool m_Is版本号Null = true;
		
		/// <summary>内部变量：备用1</summary>
		private string m_备用1;
		
		/// <summary>标示属性备用1是否为空的字段。</summary>
		private bool m_Is备用1Null = true;
		
		/// <summary>内部变量：备用2</summary>
		private string m_备用2;
		
		/// <summary>标示属性备用2是否为空的字段。</summary>
		private bool m_Is备用2Null = true;
		
		/// <summary>内部变量：备用3</summary>
		private string m_备用3;
		
		/// <summary>标示属性备用3是否为空的字段。</summary>
		private bool m_Is备用3Null = true;
		
		/// <summary>内部变量：BSM</summary>
		private int m_BSM;
		
		/// <summary>标示属性BSM是否为空的字段。</summary>
		private bool m_IsBSMNull = true;
		
		public static string TypeID = "CKQDJK.数据库参数";
		
		/// <summary>属性版本号</summary>
		[Member("版本号", "版本号", "System.String", 100, false, false, "版本号")]
		[Browsable(true)]
		[DisplayName("版本号")]
		[ReadOnly(false)]
		public string 版本号 {
			get {
				return this.m_版本号;
			}
			set {
				this.m_版本号 = value;
				this.m_Is版本号Null = false;
			}
		}
		
		/// <summary>属性备用1</summary>
		[Member("备用1", "备用1", "System.String", 200, false, false, "备用1")]
		[Browsable(true)]
		[DisplayName("备用1")]
		[ReadOnly(false)]
		public string 备用1 {
			get {
				return this.m_备用1;
			}
			set {
				this.m_备用1 = value;
				this.m_Is备用1Null = false;
			}
		}
		
		/// <summary>属性备用2</summary>
		[Member("备用2", "备用2", "System.String", 200, false, false, "备用2")]
		[Browsable(true)]
		[DisplayName("备用2")]
		[ReadOnly(false)]
		public string 备用2 {
			get {
				return this.m_备用2;
			}
			set {
				this.m_备用2 = value;
				this.m_Is备用2Null = false;
			}
		}
		
		/// <summary>属性备用3</summary>
		[Member("备用3", "备用3", "System.String", 200, false, false, "备用3")]
		[Browsable(true)]
		[DisplayName("备用3")]
		[ReadOnly(false)]
		public string 备用3 {
			get {
				return this.m_备用3;
			}
			set {
				this.m_备用3 = value;
				this.m_Is备用3Null = false;
			}
		}
		
		/// <summary>属性BSM</summary>
		[Member("BSM", "BSM", true, true, "BSM")]
		[Browsable(true)]
		[DisplayName("BSM")]
		[ReadOnly(false)]
		public int BSM {
			get {
				return this.m_BSM;
			}
			set {
				this.m_BSM = value;
				this.m_IsBSMNull = false;
				if ((this.OnOIDChanged != null)) {
					this.OnOIDChanged(this, null);
				}
			}
		}
		
		/// <summary>对象ID发生变化的时候触发的事件</summary>
		public event SuperORM.Attributes.OIDChangedHandler OnOIDChanged;
		
		/// <summary>属性改变的时候</summary>
		public event SuperORM.PropertyChangeHandler PropertyChanged;
		
		// 重载的方法，判断两个对象是否相等，判断条件是两个对象的主键值是否相等。
		public override bool Equals(object obj) {
			数据库参数 数据库参数 = ((数据库参数)(obj));
			if ((数据库参数.BSM == this.m_BSM)) {
				return true;
			}
			else {
				return false;
			}
		}
		
		/// <summary>判断某一个属性是否为空</summary>
		public override bool IsNull(string propname) {
			if (propname.Equals("版本号")) {
				return this.m_Is版本号Null;
			}
			if (propname.Equals("备用1")) {
				return this.m_Is备用1Null;
			}
			if (propname.Equals("备用2")) {
				return this.m_Is备用2Null;
			}
			if (propname.Equals("备用3")) {
				return this.m_Is备用3Null;
			}
			if (propname.Equals("BSM")) {
				return this.m_IsBSMNull;
			}
			return true;
		}
		
		/// <summary>将某个属性设置为空</summary>
		public override void SetNull(string propname) {
			if (propname.Equals("版本号")) {
				this.m_Is版本号Null = true;
				return;
			}
			if (propname.Equals("备用1")) {
				this.m_Is备用1Null = true;
				return;
			}
			if (propname.Equals("备用2")) {
				this.m_Is备用2Null = true;
				return;
			}
			if (propname.Equals("备用3")) {
				this.m_Is备用3Null = true;
				return;
			}
			if (propname.Equals("BSM")) {
				this.m_IsBSMNull = true;
				return;
			}
		}
	}
}
